package com.jnks.pojo.domain.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/***
 *  @describe 飞手位置
 *  @author Ryo
 *  @date 2024/4/23
 *  杰能科世智能安全科技（杭州）有限公司
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class DroneDriverLocation implements Serializable {

    /**
     * @describe 定位时间
     * @author Ryo
     * @date 2024/4/23
     */
    private Date locateDate;

    /**
     * @describe 高德经度
     * @author Ryo
     * @date 2024/4/23
     */
    private Double longitude;

    /**
     * @describe 高德纬度
     * @author Ryo
     * @date 2024/4/23
     */
    private Double latitude;

    /**
     * @describe GPS经度
     * @author Ryo
     * @date 2024/4/23
     */
    private Double gpsLongitude;

    /**
     * @describe GPS纬度
     * @author Ryo
     * @date 2024/4/23
     */
    private Double gpsLatitude;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        DroneDriverLocation droneDriverLocation = (DroneDriverLocation) o;
        return Objects.equals(longitude, droneDriverLocation.longitude)
                && Objects.equals(latitude, droneDriverLocation.latitude);
    }

    @Override
    public int hashCode() {
        return Objects.hash(longitude, latitude);
    }
}
